package br.com.monitor.gui;
import br.com.monitor.gui.FormularioInicial;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.GridLayout;

import javax.swing.JFrame;

import br.com.monitor.dao.Sistema;

public class FormularioPrincipal extends javax.swing.JPanel {
	
	private Sistema sistema;
	
	// declaracao dos objetos pertencentes a interface
	private JFrame telaPrincipal;
	
	public static void main(String[] args) {
		FormularioPrincipal monitor = new FormularioPrincipal();
		monitor.iniciaComponentes();
		
	}
	
	private void iniciaComponentes() {
		// iniciando e configurando o JFrame Principal
		//sistema = new Sistema();
		try{
			javax.swing.UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
			javax.swing.SwingUtilities.updateComponentTreeUI(this);
		}catch(Exception e){
			System.out.println(e.getMessage());
			System.out.println(e.getStackTrace());
		}
		telaPrincipal = new JFrame();
		telaPrincipal.setBackground(Color.WHITE);
		telaPrincipal.setLayout(new GridLayout());
		telaPrincipal.setSize(800, 600);
		telaPrincipal.setResizable(true);
		telaPrincipal.setMaximumSize(new Dimension(300, 200));
		telaPrincipal.setLocation(50, 50);
		telaPrincipal.add(new FormularioCadastro());
		//telaPrincipal.add(new FormularioInicial());
		telaPrincipal.setVisible(true);
		telaPrincipal.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		// --------------------------------------------------------- //
	}

}